1. Field of the Invention
The present invention relates to a digital data processor, and more specifically to an inclined rectangular pattern generating system for generating a rectangular pattern which is inclined to an X axis by an angle .theta. in a two-dimensional X-Y plane, by means of rewriting a memory space storing a graphic pattern.
2. Description of Related Art
In general, a graphic pattern such a rectangle has been displayed on a graphic display by performing required processing on a graphic or display memory which is composed of unitary memory elements each corresponding to a unitary dot displayed on a display screen in a one-to-one relation.
For example, in a case of indicating an elongated rectangle, a lengthwise straight line having a width corresponding to the unitary dot is drawn or depicted by a so-called lengthwise straight line generator in a vector direction of one lengthwise side of the elongated rectangle to be indicated. In addition, in order to cause the rectangle to have a given width, a required number of lengthwise straight lines having the unitary dot width are drawn or depicted. In this process, in order to determine a starting point of each of the required number of lengthwise straight lines, a so-called widthwise straight line generator is used for generating one normal line formed by the starting points of all the lengthwise straight lines to be drawn. Thus, coordinates of all dots required to form the elongated rectangle to be drawn or depicted are obtained by use of the lengthwise straight line generator and the widthwise straight line generator in combination, with the result that the elongated rectangle having a given length and a given width are drawn.
More specifically, one example of drawing a rectangle will be explained with reference to FIGS. 1 to 3. In these figures, small circles indicate a unitary dot indicated on a display screen. Ordinarily, when a straight line pattern formed by a straight line generator is inclined to an X-axis by an angle less than 45 degree, the straight line pattern will continuously change its X coordinate dot by dot, but with each one dot change of the X coordinate, the Y-coordinate of the straight line pattern will change one dot or will not change, as shown in FIG. 1. On the other hand, when a straight line pattern formed by the straight line generator is inclined to the X-axis by an angle greater than 45 degree, the straight line pattern will continuously change its Y coordinate dot by dot, but the X-coordinate of the straight line pattern will change one dot or will not change in response to each one dot change of the Y coordinate, as shown in FIG. 2.
Now, assume that a rectangle having a length of 6 dots and a width of 5 dots and having an inclination angle of .theta. to the X axis is drawn by using two straight line generators having the above mentioned characteristics.
As shown in FIG. 3, a first lengthwise straight line starting from a coordinate of (XD, YD) (i. e., one corner of the rectangle to be drawn) and formed of a string of dots A1, B1, C1, D1, E1 and F1 is drawn by a lengthwise straight line generator. Thereafter, a second lengthwise straight line formed of a string of dots A2, B2, C2, D2, E2 and F2 as shown in FIG. 3 is to be drawn by the lengthwise straight line generator. At this time, in order to determine a starting dot A2 of the second lengthwise straight line, a widthwise straight line generator as mentioned hereinbefore is used to generate a widthwise line which forms one widthwise side of the rectangle to be drawn extending from the above mentioned corner of the rectangle and which will be formed by respective starting dots A2, A3, A4, and A5 of the second and succeeding lengthwise straight lines. Then, the second and succeeding lengthwise straight lines respectively starting from the dots A2, A3, A4, and A5 thus obtained are sequentially formed by the lengthwise straight line generator.
Thus, as shown in FIG. 3, there has been drawn the elongated rectangle having a length of 6 dots and a width of 5 dots and having X- and Y-direction minute changes .DELTA.X and .DELTA.Y corresponding to the inclination angle .theta. of the lengthwise side to the X axis (.DELTA.X/.DELTA.Y=Tan .theta.).
However, in the case that an inclined rectangle is drawn, undrawn dots will occur as black dots shown in FIG. 3. This means that memory cells of the display memory corresponding to the undrawn dots, i. e., the black dots will maintain such information as existed before the rectangle concerned has been drawn. The rectangle having the undrawn dots, which can be called a "dot missing" or "wormhole rectangle", cannot give a natural impression to a viewer.